package dj.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * MenuAuth entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "menu_auth", catalog = "")
public class MenuAuth implements java.io.Serializable {

	// Fields

	private String id;
	private Menu menu;
	private String memberid;
	private String type;

	// Constructors

	/** default constructor */
	public MenuAuth() {
	}

	/** full constructor */
	public MenuAuth(String id, Menu menu, String memberid, String type) {
		this.id = id;
		this.menu = menu;
		this.memberid = memberid;
		this.type = type;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false, length = 36)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "menuid", nullable = false)
	public Menu getMenu() {
		return this.menu;
	}

	public void setMenu(Menu menu) {
		this.menu = menu;
	}

	@Column(name = "memberid", nullable = false, length = 36)
	public String getMemberid() {
		return this.memberid;
	}

	public void setMemberid(String memberid) {
		this.memberid = memberid;
	}

	@Column(name = "type", nullable = false, length = 20)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

}